<include file="Public/common" />
<block name="css">
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css"  media="all">
</block>
<block name="content">
    <div class="page-header"><h1>首页 > 产品管理 &gt;线路管理</h1></div>
    <ul id="nav" class="nav nav-tabs">
      <li role="presentation"  <if condition="$post['status'] eq 0">class="active"</if> ><a href="javascript:checkStatus(0);">已上架</a></li>
      <li role="presentation"  <if condition="$post['status'] eq 1">class="active"</if> ><a href="javascript:checkStatus(1);">待审核</a></li>
      <li role="presentation" <if condition="$post['status'] eq 2">class="active"</if>  ><a href="javascript:checkStatus(2);">被拒线路</a></li>
      <li role="presentation" <if condition="$post['status'] eq 3">class="active"</if>  ><a href="javascript:checkStatus(3);">下架线路</a></li>
    </ul>
    <div class="tab-content">
        <div class="row" >
            <form action="" class="form-inline " method="get" style="margin-left:10px;" >
                <input type="hidden" name="status" value="{$post.status}" style="display: none;">
                <div class="form-group">
                    <label for="lineNum">线路编号</label>
                    <input type="text" class="" name="lineNum" id="lineNum" placeholder="线路编号" value="{$post.lineNum}">
                </div>
                <div class="form-group">
                    <label for="lineName">线路名称</label>
                    <input type="text" class="" name="lineName" id="lineName" placeholder="线路名称" value="{$post.lineName}">
                </div>
                <div class="form-group">
                    <label for="lineName">发布部门</label>
                    <input type="text" class="" name="lineName" id="lineName" placeholder="线路名称" value="{$post.lineName}">
                </div>
                <div class="form-group">
                    <label for="pushDepartment">发布时间</label>
                    <input type="text" class="" name="" id="start_time" placeholder="开始时间" value="{$post.start_time}" readonly>
                    至
                    <input type="text" class="" name="" id="end_time" placeholder="结束时间" value="{$post.end_day}" readonly>
                </div>
                <button type="submit" class="btn btn-primary">查询</button>
            </form>
        </div>


        <table class="table table-striped table-bordered table-hover table-condensed mt-15">
            <thead>
                <tr>
                    <th><input type="checkbox" id="checkAll"/></th>
                    <th>线路名称</th>
                    <th>线路编号</th>
                    <th>成本（元）</th>
                    <th>给运营商结算单价（元）</th>
                    <th>毛利（元）</th>
                    <th>出发地</th>
                    <th>发布时间</th>
                    <th>上架状态</th>
                    <th>审核状态</th>
                    <th>发布部门/发布人</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><input type="checkbox" class="checkbox"/></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>

                    <td>
                        <a class="btn btn-primary btn-xs" href="{:U('groupOrderDetail',array('id'=>1))}">详情</a>
                        <switch name="post.status">
                            <case value="0"><button class="btn btn-primary  btn-xs">编辑</button></case>
                        </switch>
                    </td>
                </tr>
                <tr>
                    <td colspan="12">

                    </td>
                </tr>
            </tbody>
        </table>

    </div>
</block>
<block name="js">

    <script src="__STATIC__/layui/layui.all.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>

    <script>
        function checkStatus(status) {
            $('form')[0].reset();
            $('input[name="status"]').val(status);
            $('form').submit();
        }

        layui.use('laydate', function() {
            var laydate = layui.laydate;
            //常规用法
            laydate.render({
                elem: '#start_time'
            });
            laydate.render({
                elem: '#end_time'
            });
        });
    </script>

</block>
